<script lang="ts">
import Vue from 'vue'
import Dirct from "@/views/systemTools/systemSalarySettlement/step/step3/CoachAnalysis/dirct.vue";

export default Vue.extend({
  name: "CoachAnalysis",
  components: {Dirct},
  props: {
    coachList: {
      type: Array,
      default: []
    },
    mapData: {
      type: Object,
      default: () => {
        return {}
      }
    }
  },
  data() {
    return {
      tableData: [],
      coachAccount: '',
      show: true
    }
  },
  watch: {
    coachAccount(val) {
      this.show = false
      setTimeout(() => {
        this.show = true
      }, 500)
    }
  },
})
</script>

<template>
  <div>
    <!--    循环渲染单选框-->
    <el-radio v-for="item in coachList" :key="item.coachAccount" :label="item.coachAccount" v-model="coachAccount">{{
        item.coachName
      }}
    </el-radio>

    <div style="margin-top: 20px">
      <dirct v-if="show" :map-data="mapData" :coach-account="coachAccount"></dirct>
    </div>
  </div>
</template>

<style scoped lang="scss">

</style>
